//
//  TileWallView.h
//  etionUI
//
//  Created by wangjian on 7/17/13.
//
//

#import <UIKit/UIKit.h>
#import "TileWallCellView.h"

@class CTileWallView;

@protocol CTileWallViewDelegate <NSObject>

- (NSUInteger)numberOfTilesInTileWallView:(CTileWallView *)tileWallView;
- (CTileView *)tileWallView:(CTileWallView *)tileWallView tileAtIndex:(NSUInteger)index;

@optional

- (CGSize)sizeOfTileInTileWallView:(CTileWallView *)tileWallView;
- (void)tileWallView:(CTileWallView *)tileWallView didSelectedTileAtIndex:(NSUInteger)index;
- (void)tileWallViewStartRefreshing:(CTileWallView *)tileWallView;

- (id)titleWallViewRefreshHeaderViewLastUpdateTime:(CTileWallView*)view;

@end

@interface CTileWallView : UIView <UIScrollViewDelegate>

@property (nonatomic, assign) id<CTileWallViewDelegate> delegate;
@property (nonatomic, assign) CGSize tileSize;
@property (nonatomic, assign, getter = isShowRefreshHeader) BOOL showRefreshHeader;

@property (nonatomic, assign) BOOL alwaysBounceVertical;

- (void)reloadData;
- (void)endRefreshing;
- (CTileView *)tileViewAtIndex:(NSInteger)index;

@end
